<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>问答系统</title>
	{HD include file='../common/head.html'}
	<link rel="stylesheet" href="{HD $smarty.const.__PUBLIC__}/Css/question.css" />
	<script type="text/javascript" src="{HD $smarty.const.__PUBLIC__}/Js/question.js"></script>
	<div id='location'>
	
		<a href="{HD $smarty.const.__ROOT__}?c=list&cid=0">全部分类</a>
		{HD section loop=$father_cate name=n }
		{HD if $smarty.section.n.last}
			&gt;&nbsp;{HD $father_cate[n].title}&nbsp;&nbsp;
			{HD else}
			&gt;&nbsp;<a href="{HD $smarty.const.__ROOT__}?c=list&cid={HD $father_cate[n].cid}">{HD $father_cate[n].title}</a>&nbsp;&nbsp;
			{HD /if}
		{HD /section}	
	</div>

<!--------------------中部-------------------->
	<div id='center-wrap'>
		<div id='center'>
			<div id='left'>
				<div id='answer-info'>
					<!-- 如果没有解决用wait -->
					{HD if $data.solve==0}
					<div class='ans-state wait'></div>
					{HD else}
					<div class='ans-state '></div>
					{HD /if}
					<div class='answer'>
						<p class='ans-title'>{HD $data.content}
							<b class='point'>{HD $data.reward}</b>
						</p>
					</div>
					<ul>
						<li><a href="">{HD $data.username}</a></li>
						<li><i class="level lv{HD $data.level}" title="level lv{HD $data.level}"></i></li>
						<li>{HD $data.time}</li>
				
					</ul>
					{HD if $smarty.session.user!=null&&$smarty.session.uid!=null&&$data.solve==0&&$smarty.session.user!=$data.username}
					<div class='ianswer'>
						<form action="{HD $smarty.const.__ROOT__}?c=show&m=answer" method='POST'>
							<p>我来回答</p>
							<textarea name="content"></textarea>
							<input type="hidden" name='asid' value="{HD $data.asid}">
							<input type="submit" value='提交回答' id='anw-sub'/>
						</form>
					</div>

					{HD else}
					{HD /if}
					{HD if $data.solve==1}
					<!-- 满意回答 -->
					<div class='ans-right'>
						<p class='title'><i></i>满意回答<span></span></p>
						<p class='ans-cons'>{HD $best.content}</p>
						<dl>
							<dt>
								<a href=""><img src="{HD $best.face}" width='48' height='48'/></a>
							</dt>
							<dd>
								<a href="">{HD $best.username}</a>
							</dd>
							<dd><i class='level lv{HD $best.level}'></i></dd>
							<dd>{HD $best.ratio}%</dd>
						</dl>
					</div>
					{HD else}
					{HD /if}
				</div>

				<div id='all-answer'>
					<div class='ans-icon'></div>
					<p class='title'>共 <strong>{HD $answer|@count}</strong> 条回答</p>
					<ul>
					{HD foreach from=$answer key=k item=v }
						<li>
							<div class='face'>
								<a href="">
									<img src="{HD $v.face}" width='48' height='48'/>
								{HD $v.username}
								</a>
							</div>
							<div class='cons blue'>
								<p>{HD $v.content}<span style='color:#888;font-size:12px'>&nbsp;&nbsp;{HD $v.time|date_format:"%y-%m-%d"}</span></p>
							</div>
								{HD if $data.solve==0&&$smarty.session.user==$data.username}
								<a href="{HD $smarty.const.__ROOT__}?c=show&m=accept&anid={HD $v.anid}" class='adopt-btn'>采纳</a>
								{HD else}
								{HD /if}
							
						</li>
						{HD /foreach}

						<!-- <li>
							<div class='face'>
								<a href="">
									<img src="{HD $smarty.const.__PUBLIC__}/Images/noface.gif" width='48' height='48'/>
								</a>
							</div>
							<div class='cons blue'>
								<p>真不错啊！<span style='color:#888;font-size:12px'>&nbsp;&nbsp;(1900.1.1)</span></p>
							</div>
							
								<a href="" class='adopt-btn'>采纳</a>
							
						</li> -->
					</ul>
					<div class='page'>
						<a href="">1</a>
						<a href="">2</a>
						<a href="">3</a>
						<a href="">4</a>
					</div>
				</div>
				<div id='other-ask'>
					<p class='title'>待解决的相关问题</p>
					<table>
					{HD section loop=$nosolve name=m}
						<tr>
						
							<td class='t1'><a href="{HD $smarty.const.__ROOT__}?c=show&asid={HD $nosolve[m].asid}">{HD $nosolve[m].content}</a></td>
							<td>{HD $nosolve[m].answer}&nbsp;回答</td>
							<td>{HD $nosolve[m].time}</td>
						</tr>
						{HD /section}
					</table>
				</div>
			</div>
		<!-- 右侧 -->
		{HD include file='../common/right.html'}
<!-- ---右侧结束---- -->
			
		</div>

	</div>
	
<!--------------------中部结束-------------------->

<!-- 底部 -->
	<div id='bottom'>
		<p>Copyright © 2013 Qihoo.Com All Rights Reserved 廖东廷</p>
		<p>京公安网备xxxxxxxxxxxx</p>
	</div>
<!--[if IE 6]>
    <script type="text/javascript" src="{HD $smarty.const.__PUBLIC__}/Js/iepng.js"></script>
    <script type="text/javascript">
    	DD_belatedPNG.fix('.logo','background');
        DD_belatedPNG.fix('.nav-sel a','background');
        DD_belatedPNG.fix('.ask-cate i','background');
    </script>
<![endif]-->
</body>
</html>
<!-- 底部结束 -->